Skip to content

fix(drivers/139): renew expired multipart upload URLs - #3360

Open
mumingluan wants to merge 1 commit into
OpenListTeam:mainfrom
mumingluan:codex/139-refresh-expired-upload-urls
Open

mumingluan wants to merge 1 commit into
OpenListTeam:mainfrom
mumingluan:codex/139-refresh-expired-upload-urls

Conversation

@mumingluan

Copy link
Copy Markdown
Contributor

Summary / 摘要

On long uploads to 139Yun, an EOS part URL can expire before the client reaches that part. Retrying the same URL produces repeated HTTP 403 responses with AccessDenied / Request has expired.

  • Refresh URLs for the current and remaining parts of the batch under the existing upload ID.

  • Rewind the current part, keep already completed parts, and continue with the refreshed URLs.

  • Bound the refresh to one attempt per affected part and keep ordinary transfer retries separate. Other permission errors still fail normally.

  • This PR has breaking changes.

  • This PR changes public API, config, storage format, or migration behavior.

  • This PR requires corresponding changes in related repositories.

Testing / 测试

  • go test -tags jsoniter ./drivers/139 and go test -race -tags jsoniter ./drivers/139 on Windows amd64.
  • HTTP regression test covering an expired part in a later batch, renewal of the remaining parts only, preserved offsets and progress, and an unrelated 403.
  • Built for Linux amd64 with Go 1.27.3 and checked startup, health endpoint, and frontend on an installation based on v4.2.9.
  • go test ./...

Checklist / 检查清单

  • Read CONTRIBUTING.
  • Formatted the changed Go files with gofmt.
  • The patch uses OpenList's existing 139Yun request flow and contains original Go code and tests.

AI Disclosure / AI 使用声明

  • This PR includes AI-assisted content.
  • Codex assisted with investigation, implementation, regression tests, and the PR description.
  • The AI-assisted commit includes a Co-authored-by trailer.

Codex reviewed the diff and ran the focused tests and build checks described above.

- Renew the pending batch under the same upload ID when EOS rejects an expired signature.
- Keep completed parts and rewind the current section before retrying.
- Cover expiry recovery and unrelated 403 responses with HTTP tests.

Co-authored-by: Codex <267193182+codex@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant